The introduction of broadband networks, headend and terminal devices such as set-top boxes, and media such as DVD disks recorded with digitally compressed audio, video and data signals, for example, which utilize motion Picture Expert Group (MPEG) compression standards, may provide sound and picture quality that is virtually indistinguishable from the original material. One of the most popular MPEG standards is MPEG-2, which provides the necessary protocols and infrastructure that may be used for delivering digital television or DVD contents with compressed audio, video and data signals. A detailed description of the MPEG 2 standard is published as ISO/IEC Standard 13818. As broadband networks continue to evolve, there is a need to provide access for legacy devices to ensure interoperability with legacy and disparate systems.
An MPEG program may contain a plurality of data streams. For example, it may contain streams of compressed digital video and audio as well as streams for program control information. Video and audio encoders compress video and audio contents, respectively, into so called elementary streams (ES). In MPEG-2, these streams may encapsulate some other information such as decoding and presentation timestamps to generate packetized elementary streams (PES). All these streams may be encoded and multiplexed next into a transport stream (TS) for transmission. The TS may be de-multiplexed and compressed video and audio streams may be decoded in a set-top box (STB) and viewed on a TV. For the entire system, the type of encoding process, including TS encoding, may determine whether another device, e.g. STB, will be able to decode and interpret a received MPEG data stream. In this regard, the other devices may be a legacy or disparate device.
In a typical MPEG data stream, the length of individual ESs may be equivalent to the length of the program. Each ES may be encapsulated in a plurality of variable-length packets called a PES. The PES may include a header that may precede one or more payload bytes. The header may include information pertaining to the encoding process required by the MPEG decoder to decompress and decode a received ES. Each individual ES may have a corresponding PES and any encoded audio and video information may still reside in separate PESs. Notably, the PES may be viewed primarily as a logical construct and is not intended to be utilized for data interchange, transport, and interoperability. Notwithstanding, the PES may be utilized for conversion between two types of system streams, namely, TS and program stream (PS).
The TS and PS may be formed by multiplexing a plurality of PES packets. The TS may include a plurality of additional packets that may contain tables, which may be necessary for de-multiplexing the TS. The tables may be collectively called program specific information (PSI). To maintain synchronization and timing, null packets may also be inserted to fill the intervals between information-bearing packets. Timing information for an associated program may be carried by specific packets. One type of timing information may be called the program clock reference (PCR). The PCR may be located in one of the optional header fields of the TS packet. During operation, the PCR may permit the decoder to synchronize its clock to the same frequency as that of the original encoder's clock frequency. TS packets may have a fixed length of 188 bytes, which may include a header having a minimum size of 4 bytes and a maximum payload of 184 bytes.
FIG. 1 is a diagram of the structure for an exemplary MPEG transport stream 100. Referring to FIG. 1, TS 100 consists of TS packets. Each TS packet includes a header 102 and payload 104. TS packet header 102 may include the following fields: synchronization (SYNC) 106, transport error indicator 108, payload unit start indicator 110, transport priority 112, packet ID (PID) 114, transport scrambling control 116, adaptation field control 118, continuity counter 120, and adaptation field 122. The adaptation field 122 may further include the following fields: adaptation field length 132, discontinuity indicator 134, random access indicator 136, ES priority 138, flags 140, optional fields 142 and stuffing bytes 144. The optional fields 142 may further include the following: program clock reference (PCR) 146, OPCR 148, a splice countdown 150, private data length 152, adaptation field extension length 154, flags 156 and optional field 158. The payload may be a plurality of PES, namely PES1 124, PES2 126, . . . , PESn 130.
The TS 100 may include variable length PES that may be divided into fixed length packets for use by a transmission system. In this regard, the information added by the TS is additional to the information contained in the headers of the PESs. SYNC byte 106 may be used to delineate the beginning and ending of TS packet 100. The transport error indicator 108 may indicate when there is an error in a packet or block. This may be particularly useful for error block detection. The packet identifier (PID) 114 may be a unique identifier that may identify every video and audio stream. Additionally, each PSI table may have a unique PID 114. The PID 114 may be utilized for identifying a channel and may include any information required for locating, identifying and reconstructing programs. Some PIDs are reserved for specific uses by the MPEG protocol. PID values may be stored in PSI tables. In order to ensure that all the audio, video and data for a program are properly decoded, it may be critical to ensure that the PIDs are correctly assigned and that the PSI tables correspond with their associated audio and video streams.
PCR 146 may have 42 bits which represents 27 MHz clock ticks and 33 bits of PCR base represent 90 kHz ticks. The bits in PCR 146 may provide program clock recovery information that may be utilized for synchronization. PCR 146 may be used to provide a clock recovery mechanism for MPEG programs. A 27 MHz system time clock (STC) signal may typically be used for encoding MPEG signals. Decoding of the signal requires a clock that may be locked to the encoder's STC of 27 MHz. Notably, the PCR 146 may be utilized by the decoder to regenerate a local clock signal that is locked to the STC. Whenever a program is placed in the transport stream, a 27 MHz time stamp may be inserted into the PCR 146. When the signal is received by a decoder, the decoder may compare the value in the PCR 146 with the frequency of its local voltage controlled oscillator (VCO) and adjust the VCO to ensure that the VCO is locked to the frequency specified by the PCR 146. To ensure accuracy, the PCR 146 may be updated with the STC every about 100 ms.
The continuity counter (CC) 120 may be used to determine when packets are lost or repeated. It may include a 4-bit field, which may be repeatedly incremented from zero to 15 for each PID. Discontinuity indicator 134 may permit a decoder to handle discontinuities in the transport stream. Discontinuity indicator 134 may indicate a time base such as the PCR 146 and continuity counter 120 discontinuities. Random access indicator 136 may be configured to indicate whether the next PES packet in the PID stream contains a video-sequence header or the first byte of an audio frame. Splice countdown 150 may be configured to indicate the number packets of the same PID number to a splice point occurring at the start of PES packets.
An MPEG TS may be a multi-program TS or a single program TS (SPTS). A number of SPTSs may be multiplexed to create a multi-program TS. In some cases, the program may include one or more ESs that may have a similar time reference. This may occur, for example, in a movie that has video and its corresponding audio content.
PSI may include a set of tables that may be part of a TS. The tables in the PSI may be required while de-multiplexing the TS and for matching PIDs to their corresponding streams. Once the PIDs are matched to their corresponding streams, the TS may be decoded by assembling and decompressing program contents. Typically, in order to determine which audio and video PIDs contain the corresponding content for a particular stream, a program map table (PMT) may be decoded. Each program may have its own PMT bearing a unique PID value. The PAT may be decoded in order to determine which PID contains the desired program's PMT. The PAT may function as the master PSI table with PID value always equal to 0. In a case where the PAT cannot be found and decoded in the TS, no programs may be available for presentation.
The PSI table may be refreshed periodically at a rate that is fast enough to allow a STB to go through program recovery and decompression processes. This may be necessary to ensure real-time user interaction. The PSI may also be used to determine the accuracy and consistency of PSI contents. Notwithstanding, during programs changes or modification of multiplexer provisioning, there may be packets which have a PID value present in the TS, but have no corresponding reference in the PSI. Additionally, the PSI may have references to one or more packets in the PID that are not present in the TS.
In existing MPEG compliant systems, audio/video streams may be carried using MPEG-2 transport packets. Multiple streams may be differentiated using a PID contained in a packet header called the transport packet header. Transport packets from various streams may be multiplexed and transmitted on the same physical medium. Exemplary media may include, copper, coaxial cable, wireless, optical and any combination thereof. On the receiver side transport packets may be de-multiplexed and data may be separated for each stream. For example, audio packets may be extracted from the transport stream and separated from video packets.
Transport packets may include three fields, namely a 4-byte header, an optional adaptation field and a packet payload. The packet payload may not be altered by multiplexing or transmitting equipment, except during processing which may include data encryption and decryption. In generally, encryption may be done once within a typical MPEG processing system. Notwithstanding, some fields of adaptation field may be changed by multiplexing and transmission equipment. Typically, packet order within a PID channel may be maintained from an MPEG encoder to an MPEG receiver but packet order among multiple PID streams may not guaranteed by during transmission by any transmitting equipment. In cases where co-relation of packets from different PIDs may be required, packet position in a stream cannot be utilized since packet order among multiple PID channels may be altered.
Further limitations and disadvantages of conventional and traditional approaches will become apparent to one of skill in the art, through comparison of such systems with the present invention as set forth in the remainder of the present application with reference to the drawings.